package pers.mihao.quickstream.publish.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import pers.mihao.quickstream.common.model.result.Result;
import pers.mihao.quickstream.publish.manager.PublishTaskManager;
import pers.mihao.quickstream.publish.model.dto.PublishTaskReq;

import javax.annotation.Resource;

/**
 * @author mihao
 * @since 2024/11/21
 */
@RestController
public class PublishTaskController {

    @Resource
    PublishTaskManager publishTaskManager;

    @PostMapping("task/publish")
    public Result<Void> publishTask(@RequestBody PublishTaskReq publishTaskReq) {
        publishTaskManager.createPublicTask(publishTaskReq);
        return Result.success(null);
    }


}
